package cn.rkylin.oms.aftersale.resend.dao;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;

import cn.rkylin.oms.aftersale.resend.domain.AfterSaleResend;
import cn.rkylin.oms.aftersale.resend.vo.ResendVO;

public interface IAfterSaleResendDAO {

    /**
     * pageSelectByCondition:条件查询补发单列表. <br/>
     * 
     * @param page
     * @param length
     * @param queryParamVO
     * @return
     * @throws Exception
     */
    public PageInfo<ResendVO> pageSelectByCondition(int page, int length, ResendVO queryParamVO) throws Exception;

    /**
     * getResendListByCondition:根据查询条件查询补发单数据. <br/>
     * 
     * @param queryParamVO
     * @return
     * @throws Exception
     */
    public List<ResendVO> seleteByCondition(ResendVO queryParamVO) throws Exception;

    /**
     * selectByPrimaryKey:根据补发单ID获取补发单.
     * 
     * @param resendId
     * @return
     * @throws Exception
     */
    public AfterSaleResend selectByPrimaryKey(String resendId) throws Exception;

    /**
     * 修改补发单
     * 
     * @param record
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(AfterSaleResend record) throws Exception;

    /**
     * 保存补发单
     * 
     * @param resendVO
     * @throws Exception
     */
    public int insert(ResendVO resend) throws Exception;

    /**
     * selectDetailByPrimaryKey：根据补发单id获取补发单所有相关数据
     * 
     * @param resendId
     * @return
     * @throws Exception
     */
    public ResendVO selectDetailByPrimaryKey(String resendId) throws Exception;

    /**
     * 通过来源ID获取未取消补发单信息
     * @param sourceId
     * @return
     * @throws Exception
     */
    public List<AfterSaleResend> selectResendBySourceID(String sourceId) throws Exception;

    /**
     * 通过id获取补发单信息
     * @param resendId
     * @return
     * @throws Exception
     */
    public AfterSaleResend selectResendByResendID(String resendId) throws Exception;

    public ResendVO getCount(ResendVO vo) throws Exception;

    /**
     * getUnGoingCount:获取进行中的单据信息 <br/>
     *
     * @author zhanghao
     * @param paramMap
     * @return
     * @throws Exception
     */
    int getUnGoingCount(Map<String, String> paramMap) throws Exception;
}